<template>
  <div class="hu-banner" :class="shadow ? 'is-' + shadow + '-shadow' : 'is-always-shadow'">
    <div v-if="$slots.header || header" class="hu-banner__header">
      <slot name="header" />
    </div>
    <div v-if="$slots.body || body" class="hu-banner__body" :style="bodyStyle">
      <slot />
    </div>
  </div>
</template>

<script>
export default {
  name: 'Banner',
  props: {
    header: {},
    bodyStyle: {},
    shadow: {
      type: String
    }
  }
}
</script>

<style lang="scss" scope>
.hu-banner {
  .hu-banner__header {
    // border-bottom: 1px solid #F2F2F2;
    margin-top: 17px;
    width: 100%;
    height: 37px;
    margin-bottom: 16px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -ms-flex-line-pack: center;
    align-content: center;
  }
  .banner-title {
    line-height: 37px;
    font-size: 16px;
    font-weight: 900;
    color: #333;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    i {
      display: inline-block;
      width: 11px;
      height: 20px;
      background: #488dff;
      border-radius: 4px;
      margin-right: 12px;
      // vertical-align: top;
    }
  }
  .banner-refresh {
    font-size: 14px;
    width: 76px;
    height: 38px;
    text-align: center;
    line-height: 37px;
    background: -webkit-gradient(linear, right top, left top, from(#4859ff), to(#488dff));
    background: linear-gradient(-90deg, #4859ff, #488dff);
    border-radius: 4px;
    line-height: 37px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    color: #fff;
    cursor: pointer;
  }
  // .hu-banner__header::before {
  //   content: '';
  //   display: inline-block;
  //   clear: both;
  //   overflow: hidden;
  //   // visibility: hidden;
  //   vertical-align: middle;
  //   width:11px;
  //   height:20px;
  //   background:rgba(72,141,255,1);
  //   border-radius:4px;
  //   margin-right: 12px;
  // }
  .hu-banner__body {
    padding-top: 36px;
    padding-bottom: 26px;
  }
}
</style>
